#include "gtest/gtest.h"
#include "../BaseUtil/MyTest.h"
#include "DOMEventImp.h"
namespace DOMEventImp {

class UIEventImpTest : public testing::Test {
protected:
    virtual void SetUp() {
    	view = new DummyAbstractView();
    }
    virtual void TearDown() {
    	delete view;
    }

    AbstractView * view;

    class DummyAbstractView : public AbstractView {
    public:
    	virtual DocumentView * getDocument() { return NULL; }
    };
};

TEST_F(UIEventImpTest, Observer) {
	UIEventPtr evt = new UIEventImp(NULL, NULL, "", true, true, view, 5);
	ASSERT_EQ(view, evt->getView());
	ASSERT_EQ(5, evt->getDetail());
}


}
